{
To programmatically shut down Windows, you can use the ShutdownWindows method.
}

uses ComObj;


procedure TForm1.Button1Click(Sender: TObject);
var
  shell: Variant;
begin
  shell := CreateOleObject('Shell.Application');
  shell.ShutdownWindows;
end;
